<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>事件绑定</title>
    <script src="js/vue.js"></script>
</head>
<body>
<!--v-on：为 HTML 标签绑定事件。-->
<div id="app">
    <div>{{name}}</div>
    <button v-on:click="change()">改变div内容</button>
    <button v-on:dblclick="change()">改变div内容</button>

    <button @click="change()">改变div内容</button>
</div>
    <script>
        let vm = new Vue({
            el:"#app",
            data: {
                name:"张三"
            },
            methods:{
                change(){
                    this.name="王五";
                }
            }
        })
    </script>

</body>
</html>